package pa165.dominating.species.tos;

import java.io.Serializable;
import pa165.dominating.species.enums.UserType;

/**
 * @author Tomas Kalla
 */
public class UserTO implements Serializable {

    private static final long serialVersionUID = 1L;
    private Long id;
    private String name;
    private String login;
    private String password;
    private UserType type;

    public String getName() {
        return name;
    }

    public void setName(String Name) {
        this.name = Name;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public UserType getType() {
        return type;
    }

    public void setType(UserType type) {
        this.type = type;
    }

    public String getLogin() {
        return login;
    }

    public void setLogin(String login) {
        this.login = login;
    }

    @Override
    public boolean equals(final Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }

        final UserTO userTO = (UserTO) o;

        if (id != null ? !id.equals(userTO.id) : userTO.id != null) {
            return false;
        }

        return true;
    }

    @Override
    public int hashCode() {
        return id != null ? id.hashCode() : 0;
    }

    @Override
    public String toString() {
        return "pa165.dominatingspecies.User[ id = " + getId() + ", name = " + getName() + " ]";
    }
}
